<?php


require 'database.php';


$base=new Db;

$site=file_get_contents('config/config.json');
$site=json_decode($site,1);
$site_name=$site["web_name"];

$mysql_version=$base->doSql('SELECT VERSION()');
$_SERVER["mysql"]=$mysql_version[0]["VERSION()"];
$_SERVER["php"]=phpversion();

$_SERVER["gd"]=gd_info();
$_SERVER["gd"]=$_SERVER["gd"]["GD Version"];

if (extension_loaded('zlib')) {
    $_SERVER["zlib"]='YES';
} else {
    $_SERVER["zlib"]='NO';
}


if(strstr($_SERVER["HTTP_ACCEPT_ENCODING"],'gzip')){
    $_SERVER["gzip"]='YES';
}else{
    $_SERVER["gzip"]='NO';
}


$_SERVER["uname"]=php_uname();

$_SERVER["uname"]=explode("#",$_SERVER["uname"]);

$_SERVER["uname"]=$_SERVER["uname"][0];

$_SERVER["site_name"]=$site_name;

$_SERVER["version"]=$site["version"];


$art=$base->doSql('select * from ey_archives where status=1');
$_SERVER["article"]=count($art);

$Ad=$base->doSql('select * from ey_ad where status=1');

$_SERVER['ad']=count($Ad);

$links=$base->doSql('select * from ey_links where status=1');

$_SERVER["links"]=count($links);

$_tag=$base->doSql('select * from ey_taglist');

$_SERVER["tag"]=count($_tag);

return json($_SERVER);


